package ClassificationAlgorithm;

import ClassificationAlgorithmUtil.CCAUtil;
import Result.ResultClass;

public class ClassificationAlgorithmManager {

	/**
	 * This methods executes given ccaAlgorithm and reports results.
	 * @param ccaAlgorithm is the classification algorithm which wanted to executed.
	 */
	public static void Run(CCAClass ccaAlgorithm, int fold)
	{
		ccaAlgorithm.Prepare();
		ResultClass results = ccaAlgorithm.TestAlgorithm();
		CCAUtil.Report(results);
	}
	
	/**
	 * This methods executes given ccaAlgorithm paralel.
	 * @param ccaAlgorithm is the classification algorithm which wanted to executed.
	 */
	
	public static void RunParalel(CCAClass ccaAlgorithm, int numberOfFold)
	{
		for(int fold=0; fold< numberOfFold; fold++)
		{
			Run(ccaAlgorithm, fold);
		}
		
	}
}
